package com.gopay.common.cps.dao.bank.impl;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.gopay.common.base.dao.impl.BaseDAOImpl;
import com.gopay.common.cps.dao.bank.BisBizProdSpTranBKDAO;
import com.gopay.common.domain.bis.BisBizProdSpTranBKConfig;

@Repository("bisBizProdSpTranBKDAO")
public class BisBizProdSpTranBKDAOImpl extends BaseDAOImpl<BisBizProdSpTranBKConfig, Serializable> implements BisBizProdSpTranBKDAO {


	@Override
	public List<BisBizProdSpTranBKConfig> getBisBizProdSpTranBKConfig(
			String prodCode, String tradeCode) {
        String hql = "from BisBizProdSpTranBKConfig where  bankBizProdCode =:prodCode and gopayIntTxnCd =:tradeCode ";
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("prodCode", prodCode);
        params.put("tradeCode", tradeCode);
        return findByHql(hql, params);
	}

	@Override
	public List<BisBizProdSpTranBKConfig> getBisBizProdSpTranBKConfig(
			String bankCode) {
		 String hql = "from BisBizProdSpTranBKConfig where  bankCode =:bankCode ";
	     Map<String, Object> params = new HashMap<String, Object>();
	     params.put("bankCode", bankCode);
	     return findByHql(hql, params);
	}

	
}
